/*
 * @Date: 2023-11-19 15:21:38
 * @LastEditors: 付小磊
 */
// 装备管理
import request from '@/utils/request'

// 查看装备列表
export function equipmentList (data) {
    return request({
        url: '/equipment/list',
        method: 'post',
        data: data
    })
}

// 新增装备
export function addEquipment (data) {
    return request({
        url: '/equipment/addEquipment',
        method: 'post',
        data: data
    })
}

// 导入装备
export function importEquipmentInfo (data) {
    return request({
        url: `/equipment/importEquipmentInfo`,
        method: 'post',
        data: data
    })
}

// 导出装备
export function downEquipmentInfo (data) {
    return request({
        url: `/equipment/export`,
        method: 'post',
        data: data,
        responseType: 'blob'
    })
}


// 删除装备
export function deleteEquipment (data) {
    return request({
        url: `/equipment/deleteEquipment/${data}`,
        method: 'delete',
        data: {}
    })
}

// 编辑装备
export function updateEquipment (data) {
    return request({
        url: `/equipment/updateEquipment`,
        method: 'put',
        data: data
    })
}




// ---------------------------------------
// 查看装备配发列表
export function allotmentList (data) {
    return request({
        url: `/allotment/list`,
        method: 'post',
        data: data
    })
}

// 新增装备配发
export function addAllotment (data) {
    return request({
        url: `/allotment/addAllotment`,
        method: 'post',
        data: data
    })
}

// 删除装备配发
export function deleteAllotment (data) {
    return request({
        url: `/allotment/deleteAllotment/${data}`,
        method: 'delete',
        data: {}
    })
}

// 下载装备配发
export function downAllotmentInfo (data) {
    return request({
        url: `/allotment/export`,
        method: 'post',
        data: data,
        responseType: 'blob'
    })
}


// 导入装备配发
export function importAllotmentInfo (data) {
    return request({
        url: `/allotment/importAllotmentInfo`,
        method: 'post',
        data: data
    })
}

// 编辑装备配发
export function updateAllotment (data) {
    return request({
        url: `/allotment/updateAllotment`,
        method: 'put',
        data: data
    })
}













